Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Triangles

Figure 6 shows a triangle.

Figure 6 A triangle

Labels

ASCII
Triangle
Binary
trng ( = 0x74726E67 )

Data Format

Point3D             vertices[3]
vertices[]
An array of triangle vertices.

Data Size

36

Description

A triangle is a closed plane figure defined by three vertices. Attributes may be assigned to each vertex of a triangle and also to its entire face.

Default Surface Parameterization

None.

Parent Hierarchy

Shared, shape, geometry.

Parent Objects

None.

Child Objects

Vertex attribute set list (optional), attribute set (optional). A vertex attribute set list may be used to attach attributes to one or more vertices of the triangle. An attribute set may be used to attach attributes to the entire face of the triangle.

Example

Container (
    Triangle (
        -1 -0.5 -0.25
        0 0 0
        -0.5 1.5 0.45
    )
    Container (
        VertexAttributeSetList ( 3 Exclude 0 )
        Container (
            AttributeSet ( )
            DiffuseColor ( 1 0 0 )
        )
        Container (
            AttributeSet ( )
            DiffuseColor ( 0 1 0 )
        )
        Container (
            AttributeSet ( )
            DiffuseColor ( 0 0 1 )
        )
    )
    Container (
        AttributeSet ( )
        DiffuseColor ( 0.8 0.5 0.2 )
    )
)

Default Size

None.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |